package com.hw.sjms.visitorpattern;

import java.io.File;

public class FileVisitGroup implements FileVisit{

    private FileVisit[] fileVisits;

    public FileVisitGroup(FileVisit[] fileVisits) {
        this.fileVisits = fileVisits;
    }

    @Override
    public Type visit(File file) {
        for (FileVisit fileVisit : fileVisits) {
            fileVisit.visit(file);
        }
        return null;
    }
}
